import java.util.ArrayList;
import java.util.List;
import java.util.PriorityQueue;

class MyTimerTask{
    private Runnable runnable;
    //此处的time 啥时候要去执行  不是delay
    private  long time;
    public MyTimerTask(Runnable runnable,long delay){
        this.runnable =runnable;
        //手动换算一下时间
        this.time=System.currentTimeMillis()+delay;
    }
    public void run(){
        runnable.run();
    }
    public long getTime(){
        return time;
    }

}
class MyTimer{
    //使用优先级队列，按照时间作为优先级的标准
    private PriorityQueue<MyTimerTask> taskQueue =new PriorityQueue<>();
    //构造方法
    public MyTimer(){
        Thread t=new Thread(()->{
           while(true){

           }
        });
    }
    public void schedule(Runnable runnable,long delay){
        MyTimerTask task=new MyTimerTask(runnable,delay);
        taskQueue.offer(task);
    }
}
public class DemoTimer {


}
